{include file="include:header" /}
<body class="fixed-sidebar full-height-layout gray-bg " >
    <div class="row wrapper border-bottom white-bg page-heading  ">
        <div class="col-sm-4">
            <h2>新增账户</h2>
            <!-- 导航部分 -->
            <ol class="breadcrumb">
                <li><a href="{:url('admin/Index/home')}">主页</a></li>
                <li><a href="{:url('admin/Account/index')}">账户管理</a></li>
                <li><strong>新增账户</strong></li>
            </ol>
        </div>
        <div class="col-sm-8">
            <div class="title-action">
                <!-- 链接部分 -->
                <a href="{:url('admin/Account/index')}" class="btn btn-primary">账户列表</a>
            </div>
        </div>
    </div>
    <!-- 会员列表 -->
    <div class="wrapper wrapper-content">
        <form method="get" class="valid-form form-horizontal add-author">
            <!-- 基础信息 -->
            <div class="panel panel-default">
                <div class="panel-heading">基础信息</div>
                <div class="panel-body">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">角色</label>
                            <div class="col-sm-2 form-inline">
                                <select class="form-control m-b" name="a_role">
                                    {if condition="$data eq ''"}
                                            {volist name="list" id="v"}
                                            <option value="{$v['role_id']}">{$v['r_username']}</option>
                                            {/volist}
                                    {else/}
                                         {if condition="$data['a_role'] eq 2"}
                                             <option value="2">系统开发者</option>
                                        {elseif condition="$data['a_role'] eq 3" /}
                                             <option value="3">超级管理员</option>
                                        {else /}
                                            {volist name="list" id="v"}
                                            <option value="{$v['role_id']}" {if condition="$v['role_id'] eq $data['a_role']"}selected="selected"{/if}>{$v['r_username']}</option>
                                            {/volist}
                                        {/if}
                                    {/if}
                                </select>
                            </div>
                    </div>

                    <div class="hr-line-dashed"></div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">员工姓名</label>
                        <div class="col-sm-4 vcheck-abs">
                            <input type="text" class="form-control" name="a_fullname"  placeholder="员工姓名" datatype="*" errormsg="请输入员工姓名" sucmsg=" "  {if condition="$data neq ''"} {if condition="($data['a_role'] eq 2) OR ($data['a_role'] eq 3)"} readonly="readonly"  {/if}{/if}value="{$data['a_fullname']?$data['a_fullname']:''}"/>
                        </div>
                    </div>

                    <div class="hr-line-dashed"></div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">手机号码</label>
                        <div class="col-sm-4 vcheck-abs">
                            <input type="text" class="form-control" name="a_phone"  placeholder="手机号码" datatype="*" errormsg="请输入手机号码" sucmsg=" " value="{$data['a_phone']?$data['a_phone']:''}"/>
                        </div>
                    </div>

                {if condition="$data eq ''"}
                    <div class="hr-line-dashed"></div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">登录帐号</label>
                        <div class="col-sm-4 vcheck-abs">
                            <input type="text" class="form-control" name="a_username"  placeholder="登录帐号" datatype="*" errormsg="请输入登录帐号" sucmsg=" " />
                        </div>
                    </div>
                    <div class="hr-line-dashed"></div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">初始密码</label>
                        <div class="col-sm-4 vcheck-abs">
                            <input type="text" class="form-control" name="a_password"  placeholder="初始密码" datatype="*" errormsg="请输入密码" sucmsg=" " />
                        </div>
                    </div>
                {/if}

                    <div class="hr-line-dashed"></div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">管理头像</label>
                        <div class="col-sm-10">
                            <div class="upload-pic-item">
                                <div class="upload-pic square-min" style="width:150px;">
                                    <div class="pic-wrap">
                                        {if condition="$data eq ''"}
                                        <img src="__PUBLIC__/Images/img.jpg" alt="" />
                                        {else /}
                                        {if condition="$data['a_img'] eq ''"}
                                        <img src="__PUBLIC__/Images/img.jpg" alt="" />
                                        {else/}
                                        <img src="{$data['a_img']}" alt="" />
                                        {/if}
                                        {/if}
                                    </div>
                                    <div class="upload-btn">上传</div>
                                    <div class="delete-pic-btn">删除</div>
                                    <input class="pic-url" type="hidden" name="a_img" value="{$data['a_img']?$data['a_img']:''}" size="600,600" />
                                </div>
                            </div>
                            <p class="text-danger">*必填;图片尺寸600*600</p>
                        </div>
                    </div>

                    <div class="hr-line-dashed"></div>
                    <div class="form-group">
                        <div class="col-sm-offset-2 col-sm-6">
                            <input type="hidden" name="admin_id" value="{$data['admin_id']?$data['admin_id']:''}">
                            <a href="javascript:;" class="btn btn-danger submit">确认提交</a>&nbsp;&nbsp;
                            <a class="mg-left-10 btn btn-white" href="/admin/author" alt="取消修改">取消</a>
                        </div>
                    </div>
                </div>
            </div>
            
        </form>
    </div>
</body>
</html>
{include file="include:js" /}